<?php


//全局变量
include_once 'Config/config.php';


if(DEBUG){	
	ini_set ( 'dispaly_errors', 'on' );
	error_reporting ( E_ALL );
}else{
	ini_set ( 'dispaly_errors', 'off' );
	error_reporting ( 0 );
}


//数据库配置
include_once WEB_ROOT.'/Config/config_db.php';
//引入外部服务配置文件
include_once WEB_ROOT.'/Config/config_services.php';
//CURD操作
include_once WEB_ROOT.'/Data/CURD/db.php';
//公共方法
include_once WEB_ROOT.'/Common/function_common.php';
//加载工厂类，Action基类 Model基类
include_once LIB_ROOT.'Factory/Factory.class.php';
include_once LIB_ROOT.'Factory/ActionBase.class.php';
include_once LIB_ROOT.'Factory/ModelBase.class.php';
#实验类
//加载工厂类，Action基类 Model基类
#include_once LIB_ROOT.'Factory/Factory1.class.php';
include_once LIB_ROOT.'Factory/ActionBase1.class.php';
include_once LIB_ROOT.'Factory/ModelBase1.class.php';

$_path = isset($_REQUEST['path'])?$_REQUEST['path'].'/':'';
$_strAction = isset ( $_REQUEST['action'] ) ? $_REQUEST['action']: 'index';

if ( !is_file( ACTION_PATH.$_path . $_strAction . '.class.php' ) ) {
	show404 ( '无效动作' );
	die;
} else {
	Factory::getObj( $_strAction, ACTION_PATH.$_path  );//创建action对象 执行动作
}


